//
//  ViewController.m
//  02-动态拦截系统原声API
//
//  Created by ItHeiMa on 2017/9/2.
//  Copyright © 2017年 itHeima. All rights reserved.
//

#import "ViewController.h"

#import "Student.h"

#import "Teacher.h"

#import "ZXKProxy.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    
    Student *s = [[Student alloc] init];
    //调用方法的本质就是给这个类发送消息
   
    
    Teacher *t = [[Teacher alloc] init];
    [t teach:@"iOS"];
    
    ZXKProxy *proxy = [ZXKProxy alloc];
    
    //开始变身
    [proxy transForm:s];
    //复制方法 也可以执行私有方法
    [proxy performSelector:@selector(learn)];
    
    [proxy transForm:t];
    [proxy performSelector:@selector(teach:) withObject:@"java"];
    // Do any additional setup after loading the view, typically from a nib.
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
